package com.fafa.tankgame03;

import javax.swing.*;

public class MyTankGame01 extends JFrame {
    //定义一个MyPanel
    MyPanel mp = null;
    public static void main(String[] args) {
        new MyTankGame01();
    }

    public MyTankGame01() {
        mp = new MyPanel();
        Thread thread = new Thread(mp);
        thread.start();
        //绘图区域
        this.add(mp);
        //设置大小 关闭结束进程 可见性
        this.setSize(1200,950);

        this.addKeyListener(mp);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);



    }
}
